import request from '@/utils/request';

export const fetchUserInfo = () => {
  return request('/user', {
    method: 'GET',
  });
};

export const fetchUserNickname = (value: string) => {
  return request('/user', {
    method: 'PUT',
    data: { name: value },
  });
};

export const fetchUserAva = (data: any) => {
  return request('/user/avatar', {
    method: 'PATCH',
    data,
  });
};
